import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-parent3',
  template:`
    <h3>倒计时</h3>
    <button (click)="timer.start()">开始</button>
    <button (click)="timer.stop()">停止</button>
    <div class="seconds">{{timer.seconds}}</div>
    <app-child3 #timer></app-child3>
  `,
  styles: [`.seconds {color: red;}`]
})
export class Parent3Component implements OnInit {

  constructor() { }

  ngOnInit(): void {
  }

}
